perm filename TPRINT.LSP[TIM,LSP] blob
sn#677335 filedate 1982-09-12 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 Benchmark to print and read to the terminal
C00004 ENDMK
Cā;
;;; Benchmark to print and read to the terminal
(declare (fixsw t))
(defun init (m n atoms)
(let ((atoms (subst () () atoms)))
(do ((a atoms (cdr a)))
((null (cdr a)) (rplacd a atoms)))
(init1 m n atoms)))
(defun init1 (m n atoms)
(cond ((= m 0) (pop atoms))
(t (do ((i n (- i 2))
(a ()))
((< i 1) a)
(push (pop atoms) a)
(push (init1 (1- m) n atoms) a)))))
(declare (special test-atoms))
(setq test-atoms '(abc1 cde2 efg3 ghi4 ijk5 klm6 mno7 opq8 qrs9
stu0 uvw1 wxy2 xyz3 123a 234b 345c 456d
567d 678e 789f 890g))
(declare (special test-pattern))
(setq test-pattern (init 6. 6. test-atoms))
(include "timer.lsp")
(timer timit (print test-pattern))